package cn.njxzc.examples;

class G {
	int a, b;

	G() {
		a = 0;
		b = 0;
	}

	G(int i, int j) {
		a = i;
		b = j;
	}

	void setG(int i, int j) {
		a = i;
		b = j;
	}
}

class Exam3_13 {
	public static void main(String[] args) {
		G g[] = new G[3];
		g[0] = new G();
		g[1] = new G(3, 5);
		g[2] = new G(7, 9);
		System.out.println(g[1].a + g[1].b);
		System.out.println(g[2].a + g[2].b);
		g[0].setG(11, 13);
		System.out.println(g[0].a + g[0].b);

	}

}
